#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>




int remove(int* nums, int numsSize) {
	int src = 1;
	int dst = 0;
	while (src < numsSize) {
		if (nums[src] != nums[dst]) {
			nums[++dst] = nums[src];
		}
		src++;
	}
	return dst + 1;
}
int main() {

	int n = 0;
	scanf("%d", &n);
	int arr[100];
	for (int i = 0; i < n; i++) {
		scanf("%d", &arr[i]);
	}

	int newsize=remove(arr,n);
	
	for (int i = 0; i < newsize; i++) {
		printf("%d ", arr[i]);
	}
	


	return 0;
}